﻿using System;
using System.Collections.Generic;

namespace DomainModel
{
    public class StudySemester : BaseEntity
    {
        private readonly List<TimetableUnit> _timetableUnits;

        protected StudySemester()
        {
            _timetableUnits = new List<TimetableUnit>();
        }

        public StudySemester(StudyYear studyYear, DateTime beginDate, DateTime endDate)
        {
            StudyYear = studyYear;
            BeginDate = beginDate;
            EndDate = endDate;
        }

        public virtual StudyYear StudyYear { get; set; }
        public virtual DateTime BeginDate { get; set; }
        public virtual DateTime EndDate { get; set; }

        public virtual IEnumerable<TimetableUnit> TimetableUnits
        {
            get { return _timetableUnits; }
        }
    }
}